<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('会议文件列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>文件名称：</label>
                                <input type="text" name="papersName"/>
                            </li>
                            <li>
                                <label>文件转换前地址：</label>
                                <input type="text" name="papersOldUrl"/>
                            </li>
                            <li>
                                <label>文件转换后地址：</label>
                                <input type="text" name="papersNewUrl"/>
                            </li>
                            <!--<li>
                                <label>文件排序：</label>
                                <input type="text" name="papersSort"/>
                            </li>-->
                            <li>
                                <label>文件状态：</label>
                                <input type="text" name="papersState"/>
                            </li>
                            <li>
                                <label>提示;文件上传的提示：</label>
                                <input type="text" name="papersPrompt"/>
                            </li>
                          <!--  <li>
                                <label>所属父级：</label>
                                <input type="text" name="papersParent"/>
                            </li>
                            <li>
                                <label>所属会议id：</label>
                                <input type="text" name="conferenceId"/>
                            </li>
                            <li>
                                <label>创建人：</label>
                                <input type="text" name="createBy"/>
                            </li>
                            <li>
                                <label>创建时间：</label>
                                <input type="text" class="time-input" placeholder="请选择创建时间;创建时间" name="createTime"/>
                            </li>
                            <li>
                                <label>更新人：</label>
                                <input type="text" name="updateBy"/>
                            </li>
                            <li>
                                <label>更新时间：</label>
                                <input type="text" class="time-input" placeholder="请选择更新时间;更新时间" name="updateTime"/>
                            </li>
                            <li>
                                <label>删除标识;1：未删除；0：已删除：</label>
                                <input type="text" name="deletionFlag"/>
                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:papers:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a  class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:papers:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:papers:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:papers:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:papers:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:papers:remove')}]];
        var prefix = ctx + "system/papers";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "会议文件",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'papersId',
                    title: '会议文件表主键ID',
                    visible: false
                },
                {
                    field: 'papersName',
                    title: '文件名称',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a target="_blank" href="http://localhost/profile/file' + row.papersNewUrl + '">'+row.papersName+'</a> ');
                        return actions.join('');
                    }
                },
                {
                    field: 'papersOldType',
                    title: '文件转换前类型'
                },
                {
                    field: 'papersNewType',
                    title: '文件转换后类型'
                },
                {
                    field: 'papersOldUrl',
                    title: '文件转换前地址'
                },
                {
                        field: 'papersNewUrl',
                    title: '文件转换后地址'
                },
                {
                    field: 'papersSort',
                    title: '文件排序'
                },
                {
                    field: 'papersState',
                    title: '文件状态'
                },
                {
                    field: 'papersPrompt',
                    title: '提示;文件上传的提示'
                }/*,
                {
                    field: 'papersParent',
                    title: '所属父级;所属父级'
                },
                {
                    field: 'conferenceId',
                    title: '所属会议id;所属会议id'
                },
                {
                    field: 'createBy',
                    title: '创建人;创建人'
                },
                {
                    field: 'createTime',
                    title: '创建时间;创建时间'
                },
                {
                    field: 'updateBy',
                    title: '更新人;更新人'
                },
                {
                    field: 'updateTime',
                    title: '更新时间;更新时间'
                },
                {
                    field: 'deletionFlag',
                    title: '删除标识;1：未删除；0：已删除'
                }*/,
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];

                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.papersId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.papersId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });

    </script>
</body>
</html>